#!/usr/bin/python

from sys import argv

min_init= False
min= 0
max= 0
for file in argv[1:]:
	s= open(file, "r")
	for line in s.readlines()[1:]:
		numbers= map(float, line.split())
		
		for n in numbers:
			if n > max:
				max= n
			elif n < min or not min_init:
				min_init= True
				min= n
	s.close()


s_conf= open("conf.txt" ,"w")
s_conf.write(str(min) + " " + str(max))
s_conf.close()



			

